﻿using System.Web;
using System.Web.Mvc;

namespace VinhSon.Models
{
    public static class AreaExtension
    {

        #region Area

        public static string AreaContentPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/");
        }

        public static string AreaScriptPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/js/");
        }

        public static string AreaCssPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/css/");
        }

        public static string AreaImagesPath(this HtmlHelper helper, string area, string module)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/images/" + module + "/");
        }

        public static string AreaScriptPath(this HtmlHelper helper, string area, string module)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/js/" + module + "/");
        }

        public static string AreaCssPath(this HtmlHelper helper, string area, string module)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/css/" + module + "/");
        }

        public static string AreaImagesPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/images/");
        }

        public static string AreaContentVitualPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/");
        }

        public static string AreaScriptVitualPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/js/");
        }

        public static string AreaCssVitualPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/css/");
        }

        public static string AreaImagesVitualPath(this HtmlHelper helper, string area)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/images/");
        }

        public static string AreaScriptVitualPath(this HtmlHelper helper, string area, string module)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/js/" + module + "/");
        }

        public static string AreaCssVitualPath(this HtmlHelper helper, string area, string module)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/css/" + module + "/");
        }

        public static string AreaImagesVitualPath(this HtmlHelper helper, string area, string module)
        {
            return VirtualPathUtility.ToAbsolute("/Areas/" + area + "/Content/images/" + module + "/");
        }

        #endregion

        #region Default

        public static string AreaContentPath(this HtmlHelper helper)
        {
            return VirtualPathUtility.ToAbsolute("/Content/");
        }

        public static string AreaScriptDefaultPath(this HtmlHelper helper)
        {
            return VirtualPathUtility.ToAbsolute("/Scripts/");
        }

        public static string AreaScriptPath(this HtmlHelper helper)
        {
            return VirtualPathUtility.ToAbsolute("/Content/js/");
        }

        public static string AreaCssPath(this HtmlHelper helper)
        {
            return VirtualPathUtility.ToAbsolute("/Content/css/");
        }

        public static string AreaImagesPath(this HtmlHelper helper)
        {
            return VirtualPathUtility.ToAbsolute("/Content/images/");
        }

        #endregion

        #region Upload Folder

        public static string UploadPath(this HtmlHelper helper)
        {
            return "/Upload/UserUpload/";
        }

        public static string UploadPath(this HtmlHelper helper, string controllerName)
        {
            return string.Format("/Upload/{0}/", controllerName);
        }

        #endregion

    }
}
